Parent Child Hierarchy Examples
Parent child hierarchies are used to organize hierarchical information in the data source. Unlike level-based hierarchies, the relationships between each hierarchy level is not defined by level columns. Rather, the hierarchy structure is defined by assigning to each attribute the unique key of its parent.
Parent-child structures are usually very convenient when the levels are not even (i.e. they are ragged); when the relationship between elements is a "nested" or "cork-scerw" type structure; or, when the number of levels changes frequently. The examples below 2 such classic parent-child applications found frequently.
- Click here to learn more about parent child hierarchies.
- Click here to learn how to build parent child hierarchies.
- Click here for more on how to use them in Discover.
Note: parent child hierarchies are available with an Enterprise license only.
In this example, an organizational parent child hierarchy was built. In the table, we have the OrganizationName column (green highlight below) and the OrganizationKey and ParentOrganizationKey columns (red highlight).
The OrganizationKey and ParentOrganizationKey columns (green highlight below) were added as child key and parent key in the Attribute selections (red highlight). The OrganizationName column (blue highlight) was added as the caption column.
The rollup type is set to Self and Children, so that parent and child values will be aggregated.
In Discover, we can access the hierarchy as usual (green highlight below). We see that it has 4 levels, which can be traversed in the grid.
In this example, an accounting parent child hierarchy was built. The table contains the AccountDescription column (yellow highlight below), the AccountKey (red highlight), the parent key (orange highlight), and the operator column (green highlight).
The AccountKey and ParentAccountKey columns (green highlight below) were added to Child Key and Parent Key in Attribute Selections (red highlight). AccountDescription (blue highlight) was added to Caption, and the Operator column (purple highlight) was added as the Unary Operator.
The rollup type is set to Children, so that the parent level will display the aggregated value of its children.
We also see how the unary operator defined the way that values were calculated. For instance, under Balance Sheet (green highlight below), Liabilities and Owners Equity was subtracted from Assets. While under Statistical Accounts (yellow highlight) the child values were not aggregated or subtracted, because they represent distinct attributes that cannot logically be rolled up to calculate a single value.